package com.yalu.dao.data.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.stereotype.Repository;

import com.yalu.dao.base.impl.BaseJDBCDaoImpl;
import com.yalu.dao.data.ProductyearsReportDao;
import com.yalu.util.ReportExportUtil;

import core.report.yearReport.bean.Productyears;

@Repository
public class ProductyearsReportDaoImpl extends BaseJDBCDaoImpl implements ProductyearsReportDao{

	@Override
	public List<Productyears> getReportDataBeanList(
			String dateType, String beginTime, String endTime) {
		List<Productyears> dataList = new ArrayList<Productyears>();
		String sql = ReportExportUtil.getProductyearsReportSql(dateType, beginTime,endTime);
		SqlRowSet rs = executeQuery(sql);
		System.out.println(sql);
		while(rs.next()){
			Productyears bean = new Productyears(rs);
			dataList.add(bean);
		}
		return dataList;
	}
	


}